package com.feeyo.monitor.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

import com.feeyo.monitor.domain.Department;
import org.apache.ibatis.annotations.Param;

/**
 * 部门类dao
 * @Author <a href="mailto:bliulei@variflight.com">liulei</a>
 * @Description Created by liulei on 2017/5/18 下午5:42.
 */
@Mapper
public interface DepartmentMapper {
    int deleteByPrimaryKey(String id);

    int insert(Department record);

    int insertSelective(Department record);

    Department selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);
    
    List<Department> selectByPage(Map param);
    
    int updateDeleteStatus(String deptId);

    int updateChildDeleteStatus(String parentId);

    List<String> selectTreeNode(String depId);

    String selectIdByDept1(String name);

    String selectIdByDept1AndDept2(@Param("name") String name,@Param("parentid") String parentid);
}